package de.westranger.forex.trading.genetic.allel.operator;

import de.westranger.forex.trading.genetic.allel.Node;

public class EvaluateTerminal implements Node{
	private static final long serialVersionUID = 5751703125292595156L;
	private Node root;
	private EvaluateTerminalSymbol termSym;

	public EvaluateTerminal(final Node root,final EvaluateTerminalSymbol termSym) {
		this.root = root;
		this.termSym = termSym;
	}

	@Override
	public Node getRightChild() {
		return null;
	}

	@Override
	public Node getLeftChild() {
		return null;
	}

	@Override
	public int getValue() {
		return termSym.getValue();
	}

	@Override
	public Node getRoot() {
		return this.root;
	}

	@Override
	public void setRightChild(Node rightChild) {
		// has no children!
	}

	@Override
	public void setLeftChild(Node leftChild) {
		// has no children!
	}

	@Override
	public void setRoot(final Node root) {
		this.root = root;
	}
	
	@Override
	public Node clone(){
		return new EvaluateTerminal(null,this.termSym);
	}
	
	public void setEnum(final EvaluateTerminalSymbol symb){
		this.termSym = symb;
	}
}
